package com.panopset.game;

/**
 * Split a span by a percentage.
 *
 * @author Karl Dinwiddie
 *
 */
public class Splitzer {

    /**
     *
     * @param span Span to split.
     * @param splitPct Percentage to split.
     * @return int[0] = (span * splitPct) / 100
     *         int[1] = span - int[0]
     */
    public int[] split(int span, int splitPct) {
        int[] rtn = new int[] {0, 0};
        rtn[0] = (span * splitPct) / 100;
        rtn[1] = span - rtn[0];
        return rtn;
    }

}
